home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 June / Software of the Month Club 1996 June.iso / pc / dos / dtp / display / doc / display.doc < prev    next >
Text File  |  1996-02-02  |  58KB  |  1,315 lines

  1.     DDDD      III       SSSS    PPPP     LL           AAAA     YY      YY
  2.     DDDDD     III     SSSSSS    PPPPPP   LL         AAAAAAAA    YY    YY
  3.     DD  DD    III    SSS        PP  PP   LL         AA    AA     YY  YY
  4.     DD   DD   III    SSSSS      PPPPPP   LL         AA    AA      YYYY
  5.     DD   DD   III      SSSSS    PPPP     LL         AAAAAAAA       YY
  6.     DD  DD    III        SSS    PP       LL         AA    AA       YY
  7.     DDDDD     III    SSSSSS     PP       LL         AA    AA       YY
  8.     DDDD      III    SSSS       PP       LLLLLLLL   AA    AA       YY
  9.  
  10.  
  11.                              Program written by
  12.                  Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)
  13.  
  14.                              Document written by
  15.                  Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)
  16.                  Oliver Weyand (chbrin3@nyx.uni-konstanz.de)
  17.               Bernhard Maerz (F58394@rio.ngate.uni-regensburg.de)
  18.  
  19.                              Document modified by
  20.                     Ben Jos Walbeehm (abruzzis@cas.usf.edu)
  21.  
  22.  
  23.          Copyright (C) 1993-1996 by Jih-Shin Ho. All rights reserved.
  24.  
  25.    !!!  Permission to use and distribute DISPLAY(Executable format)     !!!
  26.    !!!  for any purpose and without fee is hereby granted, provied      !!!
  27.    !!!  that you don't make profit from DISPLAY directly. That is, you  !!!
  28.    !!!  can use DISPLAY to create things you like and sell them, but    !!!
  29.    !!!                                                                  !!!
  30.    !!!                   you CAN'T sell DISPLAY.                        !!!
  31.    !!!                                                                  !!!
  32.    !!!  For BBS and software distribution sites, some handling charge   !!!
  33.    !!!  is allowed.                                                     !!!
  34.  
  35.    !!! This software is provided "as is" without express or implied     !!!
  36.    !!! warranty. The author is not responsible for any damage caused by !!!
  37.    !!! this program.                                                    !!!
  38.  
  39.  
  40. Table of Contents:
  41. ------------------
  42.      (1)  Introduction
  43.      (2)  General Notes
  44.      (3)  Supported Formats
  45.      (4)  Command Line Switches
  46.      (5)  Function Keys
  47.      (6)  Mouse Buttons
  48.      (7)  Screen saver
  49.      (8)  Preview
  50.      (9)  Initialization steps
  51.      (10) Menu
  52.      (11) Special Effects
  53.      (12) Tech. information
  54.      (13) About the author
  55.      (14) Final
  56.  
  57.  
  58. (1) Introduction
  59. ================
  60.  
  61.   This program lets you READ, WRITE and DISPLAY images/movies with different
  62.     formats. It lets you do some special effects (rotation, dithering, ...)
  63.     on images as well.
  64.   Features:
  65.     Includes simple file management system.
  66.     Supports 'slide show', 'batch conversion', 'contact sheet making',
  67.              'image preview'.
  68.     There is NO LIMIT on image size.
  69.     This program supports 8, 15, 16, 24 bits display.
  70. +   Supports movie files (DL, FLI/FLC, RAW, MPEG, AVI, GL, IFF/ANIM, QT).
  71.     Supports FLC making.
  72.     Tiny screen saver.
  73.     CD player (including Volume control for Sound Blaster).
  74. +   Supports sound for AVI, QT; MPEG, FLI/FLC, DL, RAW with WAV file.
  75. +   Simple WAV, AU player.
  76.     Supports mouse.
  77.  
  78.   This Program is MEMORY-GREEDY. If you do not have enough memory, its
  79.   performance is poor.
  80.  
  81.   The official site is NCTUCCCA.edu.tw:/PC/graphics/disp.
  82.   The IP address is 140.111.1.10 or 192.83.166.10
  83.   The beta test version of next release is in the beta directory.
  84.   I often upload DISPLAY to SimTel. So if NCTUCCCA is too slow, you can try:
  85.   oak.oakland.edu:/SimTel/msdos/graphics.
  86.   Filenames are : disp???a.zip, disp???b.zip. ??? is version number.
  87.  
  88.  
  89. (2) General Notes
  90. =================
  91.  
  92.   Line begins with '+' is newly added/modified after last version.
  93.   Resources/parameters are in config file, config.dis. This file is read when
  94.   DISPLAY starts up.
  95.   You can use text editor to edit config.dis.
  96.   If you encounter something unknown, please read display.faq and config.dis.
  97.  
  98.  
  99. (3) Supported Formats
  100. =====================
  101.  
  102.   Read: GIF(.gif)*, Japan MAG(.mag), Japan PIC(.jpc), Sun Raster(.ras),
  103.         Jpeg in Jfif(.jpg)*, XBM(.xbm), Utah RLE(.rle), PBM(.pbm), PGM(.pgm),
  104.         PPM(.ppm), PM(.pm), PCX(.pcx), Japan MKI(.mki), Tiff(.tif),
  105.         Targa(.tga), XPM(.xpm), Mac Paint(.mac), GEM/IMG(.img),
  106.         IFF/ILBM/PBM(.iff,.lbm), Windows BMP(.bmp), QRT ray tracing(.qrt),
  107.         Mac PICT(.pct), VIS(.vis), PDS(.pds), VIKING(.vik), VICAR(.vic),
  108.         FITS(.fit), Usenix FACE(.fac), IRIS/SGI(.sgi), YUV(.yuv), RAW RGB(.rgb),
  109.         PCPAINT/Pictor(.pic,.clp), RAW GREY(.gry), Photo-CD(.pcd),
  110.         VORT output(.pix), WordPerfect Graphics(.wpg), Windows ICON(.ico),
  111.         ANSI screen file(.ans), Image INDEX(.idx), VIVID output(.img,.viv),
  112.         Thumbnail(.tnl), Dr. Halo(.cut), Japan PI(.pi), PNG(.png)*.
  113.  
  114.         DL(.dl), FLI(.fli), FLC(.flc), RAW(.raw, produced by DMPEG),
  115. +       MPEG(.mpg), AVI(.avi), GL(.gl), IFF/ANIM(.anm), QuickTime (.mov).
  116.  
  117. +       RIFF/WAVE(.wav), Sun au(.au).
  118.  
  119.         the extensions in () are standard extensions.
  120.  
  121.   Write: GIF*, Sun Raster, Jpeg*, XBM, PBM, PGM, PPM, PM, Tiff, Targa,
  122.          XPM, Mac Paint, Ascii, Laser Jet, IFF/ILBM, Windows BMP,
  123.          Mac PICT, VIS, FITS, FACE, PCX, GEM/IMG, IRIS/SGI, YUV, RAW RGB,
  124.          Postscript, RAW GREY, Wordperfect Graphics, Windows ICON,
  125.          Image INDEX(.idx), ANSI screen file, Thumbnail, Dr. Halo, PNG*.
  126.  
  127.   Preview: GIF, Jpeg, Windows BMP, PBM, PGM, PPM, Targa, PCX, Mac Paint,
  128.            Photo-CD, PNG, XBM, Sun Raster, Thumbnail, GEM/IMG, Windows ICON,
  129.            WPG, FACE, IFF/ILBM, XPM, IRIS/SGI.
  130.  
  131.   '*' means 'support image comment'.
  132.  
  133.   All Read/Write formats support full color(8 bits), grey scale, b/w dither,
  134.   and 24 bits image, if allowed for that format.
  135.  
  136.  
  137. (4) Command Line Switches
  138. =========================
  139.  
  140.   DISPLAY understands several command-line parameters. Some of them are
  141.   useful for setting up your preferred configuration or overwriting
  142.   config.dis options. Others are for command-line processing.
  143.  
  144.   Symbol :
  145.     aaa | bbb : You can use aaa or bbb. They are equivalent.
  146.     [ aaa ]   : aaa is optional.
  147.     < aaa >   : Use other value or string to replace aaa.
  148.  
  149.   (a) For normal use :
  150.     display [-d|--display <initial_display_type>] [-s|--sort <sort_method>]
  151.             [-f <config_file>] [-c <config_file] [-a] [-n l|g] [--help|-?]
  152.             [--target|-t <working_directory>] [--mask|-m 'filename_mask']
  153.             [--report|-r <report_file>]
  154.  
  155.     initial_display_type: 8 (SVGA, default), 15, 16 (HiColor), 24 (TrueColor)
  156.     sort_method: 'name', 'ext'.
  157.     -f: Read user specified config file only.
  158.     -c: Read Local, Global and user specified config file.    
  159.     -a: Always set to highest display type
  160.     -n: Do not read Local or Global config file.
  161.         Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
  162.     -t: change to the specified directory when DISPLAY starts up.
  163.     filename_mask: separated by ';'. quotation marks are needed before and after
  164. +     filename_mask. Mask length should be less than 128.
  165.     report_file: Contains useful information generated by DISPLAY. 
  166.                  Please don't use relative path(e.g.: ../qqq/report).             
  167.  
  168.   (b) For command-line single image/movie viewing :
  169.     display [--width|-w <image_width>] [--height|-h <image_height>]
  170. +           [--noask|-k] [--stay] [--type <standard extension>]
  171.             image/movie_file
  172.  
  173.     -w & -h: For image format without information header(YUV,RGB,GREY).
  174.     -k: Don't ask any question, start movie playing immediately.
  175. +   --stay: Don't exit DISPLAY after viewing.
  176. +   --type: Specify the input image type.
  177.  
  178.   (c) For command-line batch conversion :
  179.     display --batch | -b <output_format> [--bw|--grey|--color|--true|--same]
  180.             [--stay] [--dialog | -g] [--report|-r <report_file>] [--effect]
  181.             [--width|-w <image_width>] [--height|-h <image_height>]
  182.             [--skip <bytes>] [-i]
  183.             input_file | input_file output_directory | input_file output_file |
  184.             input_files output_directory
  185.  
  186.     output_format: Standard extensions. Like gif, bmp ... (see section (6))
  187.     bw,grey,color,true: B/W dither, Grey scale, 8bit full color, 24bit
  188.       true color.
  189.     same: The same color format as input image. If input is 24-bit image,
  190.           output is saved as true color image (if possible). Otherwise output
  191.           is saved as 8bit full color image.
  192.     The default color type for batch conversion is 8bit full color.
  193.     -g: DISPLAY will let you change the setting of output_format if there
  194.         is any.
  195. +   --stay: Don't exit DISPLAY after viewing.
  196. +   --effect: Perform default special effects (in config.dis) on images.
  197. +   --skip: Number of bytes to skip before reading .GRY and .RGB images.
  198. +   -w & -h: For images format without information header(YUV,RGB,GREY).
  199. +   -i : Don't initialize screen.
  200.  
  201.   (d) For command-line slide show :
  202.     display [--slide|-l] [--noask|-k] [--report|-r <report_file>]
  203.             [--stay] image_files | @response_file
  204.  
  205.     -l: Tell DISPLAY you want slide show (even for single file).
  206.     -k: Don't ask any question, start slide show immediately.
  207.     response_file: please refer to display.faq.
  208. +   --stay: Don't exit DISPLAY after viewing. 
  209.  
  210.   (e) For command-line contact sheet generation :
  211.     display --sheet|-e <batch_contact_sheet_script> [--report|-r <report_file>]
  212.  
  213.     for the batch_contact_sheet_script format, read display.faq.
  214.  
  215.   (f) For command-line movies (more than 1) playing :
  216.     display --movie|-v [--noask|-k] [--preload|-p 0|1] 
  217.             [--report|-r <report_file>] movie_files
  218.  
  219.     -k: Don't ask any question, start movie playing immediately.
  220.     -p: Preload or not.
  221.  
  222. + (g) For command-line UU/MIME Decode :
  223. +   display --uud|--mmd files
  224.  
  225.     Wild-card filenames are sorted by name in ascend order.
  226.     Notes: Files are written to current directory.
  227.  
  228. + (h) For command-line UU/MIME Encode :
  229. +   display --uue|--mme [--line <line_number>] files
  230.  
  231.     --line: Number of lines to be written to one file. Default is 950.
  232.             0 means 'don't split file'.
  233.     Notes: Files are written to current directory.
  234.  
  235.   Please read display.faq for the information not mentioned here.
  236.  
  237.  
  238.  
  239. (5) Function Keys
  240. =================
  241.  
  242.     Escape : Abort function and return.
  243.     RETURN : Select.
  244.     ALT-X  : Quit program anywhere without prompting.
  245.  
  246.   (a) In menu selection :
  247.     ESCAPE,F10 : Quit program (prompted).
  248.     F1         : Show DISPLAY.DOC.
  249.     CTRL-F1    : Show user-defined help file. (read config.dis)
  250.     F4         : Change parameters.
  251. +                If already in parameter-changing screen, pop up sub-menu.
  252.     ALT-Z      : Shell to DOS.
  253.     F9         : For those who cannot remember all commands in DISPLAY.
  254.  
  255.     t,T   : Tag file. (Untag tagged files)
  256.     +     : Tag a group of files. (See match.doc)
  257.     ALT-T : Tag all files.
  258.     u,U   : Untag file.
  259.     -     : Untag a group of files. (See match.doc)
  260.     ALT-U : Untag all files.
  261.     *     : Reverse tag.
  262.     .     : Tag all files after (and under) select bar.
  263.     ,     : Tag all files before (and under) select bar.
  264.     >     : Untag all files after (and under) select bar.
  265.     <     : Untag all files before (and under) select bar.
  266.  
  267.     CTRL-A -- CTRL-Z : Change disk drive directly.
  268.     F2     : Change disk drive.
  269.     CTRL-F2: Go to user-specified disk and directory.
  270.     F3     : Change filename masks. (Separated by ';') (See match.doc)
  271.     CTRL-F3: Change exclude masks. Don't show files which match these masks.
  272.     F7     : Make Directory.
  273.     F6,m,M : Move file(s).
  274.     ALT-M  : Move single(current) file (ignore tags).
  275.     F8,d,D : Delete file(s).
  276.     ALT-D  : Delete single(current) file (ignore tags).
  277.     r,R    : Rename file.
  278.     c,C    : Copy File(s).
  279.     ALT-C  : Copy single(current) file (ignore tags).
  280.     ALT-A  : Re-read directory. Keep current description entries.
  281.     ALT-B  : Re-read directory. Discard current desciption entries.
  282.     ALT-S  : Save config file.
  283.     BACKSPACE : Go up one level in the directory tree.
  284.  
  285.     F5  : Some effects on pictures, e.g. flip, rotate ...
  286.     z,Z : Display first 10 bytes of file in Ascii, Hex and Dec modes.
  287.     f,F : Display disk/memory free space.
  288.     s,S : Slide Show (shows tagged files). ESCAPE to terminate.
  289.     b,B : Batch conversion (converts tagged files to a single format).
  290.           You can perform up to 8 special operations.
  291.           Each is independent of the others.
  292.     e,E : Contact sheet making.
  293.     q,Q : Accumulation color quantization.
  294.           Finds the best palette set for a group of files.
  295.           Very useful for producing animation pictures. (read display.faq)
  296.     l,L : List available graphic/text modes.
  297.     o,O : Display font.
  298.     v,V : View text file.
  299.     x,X : View binary file.
  300.     a,A : View ANSI screen file(s).
  301.           If you view tagged files, use F10 to interrupt.
  302.     n,N   : Show image comment.
  303.     ALT-N : Write image comment to file.
  304. +   ALT-P : Print image file.
  305.  
  306.     ALT-E : Edit description entry. (see display.faq)
  307.     ALT-W : Write description and/or image dimension to description file. 
  308.             (see display.faq) Note: You must set resource 'wrtie_desc_dim'
  309.             to 1 to enable the dimension writing.
  310.     ALT-F : Load description and/or image dimension from DEFAULT description
  311.             file. (see display.faq) Note: If 'use_perm_desc' is active, load
  312.             desc. and/or dim. from permanent desc. file.
  313.     ALT-G : Load description and/or image dimension from CURRENT description
  314.             file. (see display.faq) Note: The same note as above.
  315.     g,G   : Set CURRENT description file to the file under select bar and
  316.             load it. If 'use_perm_desc' is active, change perm_description_file
  317.             to this file.
  318.  
  319.     Ins   : Change display type (8, 15, 16, 24 bits).
  320.     Del   : Change display resolution.
  321. +   TAB   : In mode selection screen : Change process target. (read display.faq)
  322. +           In file selection screen : Change view window (for double view).
  323. +   i,I   : Show previously loaded image.
  324.     w,W   : Write previously loaded image.
  325.     p,P   : Toggle preview.
  326. +   =     : Toggle double view.
  327. +   /     : Toggle HiColor preview.
  328.     ALT_H : Toggle between 'graphic text' and 'normal text' modes.
  329.     Page Up/Down : Move one page.
  330.     Left/Right arrow : Change display type In 'screen' & 'effects' menu.
  331.     0..9 :
  332.     SHIFT-A .. Z : Jump to first file whose name starts with this character.
  333.     ALT-F5 .. ALT-F8 : User commands.
  334. +   ALT-R : Execute user-input command.    
  335. +   ALT-U : Push current image to stack (last position). Works in mode
  336. +           selection and effect selection menus only.
  337. +   ALT-O : Pop image from stack (last position). Works in mode selection
  338. +           and effect selection menus only.
  339.  
  340. +   CTRL-ALT-Q: Record keyboard (only) events. (up to 40) (works for menu
  341. +               selection only)
  342. +   CTRL-ALT-W: Stop recording events.
  343. +   CTRL-ALT-P: Re-play recorded events.
  344.  
  345.  
  346.   (b) In graphics mode :
  347.     RETURN : return to text mode. If 'return_to_next' is true and current
  348.              image is still image, show next still image. 
  349.              In this mode, movies and other non-still images are ignored.
  350.     BACKSPACE : If 'return_to_next' is true and current image is still
  351.                 image, show previous still image.
  352.     SPACE,ESCAPE : return to the text mode.
  353.     + : Go to next resolution.
  354.     - : Go to previous resolution.
  355.     Arrow keys, Home, End, Page Up, Page Down : Scroll image.
  356.       Home: Left-most.
  357.       End: Right-most.
  358.       Page Up: Top of image.
  359.       Page Down: Bottom of image.
  360.     CTRL-Arrow keys: Crop image by one line.
  361.     CTRL-SHIFT-Arrow keys: Big Crop (Controlled by resource 'big_crop_step').
  362.     F1 .. F8 : Gamma correction.
  363.       F1,F3,F5,F7: decrease Red,Green,Blue,All.
  364.       F2,F4,F6,F8: increase Red,Green,Blue,All.
  365.     F9,F10 : Zoom Out/In.
  366.     ALT-Z : Pop out graphic menu. SPACE to close.
  367.     ALT-E : Edit description entry.
  368.     ALT-B : Toggle between normal mouse mode and mouse ball mode.
  369.             (see display.faq)  
  370. +   ALT-T : Tag current image file. Useful if 'return_to_next' is 1.
  371. +   ALT-U : Untag current image file. Useful if 'return_to_next' is 1.
  372. +   CTRL-F11 : Show mouse coordinates.
  373. +     Arrow_keys : move cursor 1 pixel.
  374. +     CTRL-Arrow_keys : move cursor 10 pixel.
  375. +     SPACE,RETURN : Done.
  376. +     ESCAPE : Abort.
  377. +     ALT-F11 : Define cropping rectangle.
  378. +       ALT-F11 : Crop image.
  379. +       ESCAPE  : Abort.
  380. +   n, N  : Show image comment.
  381. +   ALT-D : Delete this image file.
  382.  
  383.  
  384.   (c) In text viewer :
  385.     F2         : Search string (case-sensitive).
  386.     F3         : Search string (case-insensitive).
  387.     F6         : Search again.
  388.     CTRL-LEFT  : Scroll right 10 chars.
  389.     CTRL-RIGHT : Scroll left 10 chars.
  390.     CTRL-PGUP  : Goto top of file.
  391.     CTRL-PGDN  : Foto bottom of file.
  392. +   HOME       : Goto column 1.
  393. +
  394. +   To search string in HEX mode, use "..." or '...'. The default input for
  395. +   search in HEX mode is hex number.
  396.  
  397.  
  398.   (d) In contact sheet preview & Postscript preview :
  399.     '+' : Increase scaling factor.
  400.     '-' : Decrease scaling factor.
  401.     Ins,Del : Fine tune(Inc/Dec) scaling factor.
  402.  
  403.  
  404.   (e) In slide show :
  405.      If the delay time is 0, DISPLAY waits until you hit any key.
  406.        (except ESCAPE).
  407.      'w' or 'W' : pause, any key to continue.
  408.      Up-Arrow   : Go back one image.
  409.      BACKSPACE  : Go back one image. Works for scroll & non-scroll mode.
  410.      ALT-D      : Mark current image as deletable. '-D-' is displayed at the
  411.                   top-left screen corner.
  412.      ALT-C      : Mark current image as copiable. '-C-' is displayed.
  413.      ALT-M      : Mark current image as movable. '-M-' is displayed.
  414.      ALT-T      : Mark image as tagged, that is, tag image after slide show.
  415.                   '-T-' is displayed. You must set 'keep tag after slide show'
  416.                   to 0, first.
  417.      ALT-N      : Mark image as untagged, that is, untag image after slide
  418.                   show. '-N-' is displayed. You must set 'keep tag after
  419.                   slide show' to 1, first.
  420.      ALT-U      : Unmark current image.
  421.      Note:
  422.        Reverse slide show is slower.
  423.        You must set 'delay time = 0' and 'not scroll' to use Up-Arrow and
  424.          ALT-D/ALT-C/ALT-M/ALT-U/ALT-T/ALT-N.
  425.        Before leaving slide show, if there are marked images, DISPLAY will 
  426.          show you another menu for the delete/copy/move operations.
  427.  
  428.  
  429.   (f) In movie:
  430.      SPACE  : pause playing. If you press 'w' or 'W' at this time, DISPLAY
  431.        writes current frame to file. After writing, playback pauses at next
  432.        frame.
  433.      ESCAPE : Terminate playing.
  434.      '+'    : Increase sound volume.
  435.      '-'    : Decrease sound volume.
  436.      Ins    : Increase master volume.
  437.      Del    : Decrease master volume.
  438. +    F10    : (For movie slide show) Terminate current movie. Play next movie.
  439.      
  440.    (g) In ANSI viewer:
  441.      ALT_B : Toggle between normal mouse mode and mouse ball mode.
  442.              (see display.faq)  
  443.  
  444.    (h) In image INDEX viewer:
  445.      TAB : Change focus to next image.
  446. +    SHIFT-TAB, BACKSPACE : Change focus to previous image.
  447.      SPACE, RETURN : View this image.
  448.      ESCAPE : Terminate.
  449. +    ALT-D  : Delete this image file.
  450.  
  451.    (i) In CD player:
  452.      1 .. 9 : Select track directly.
  453.      +   : Increase CD volume. (Sound Blaster)
  454.      -   : Decrease CD volume. (Sound Blaster)
  455.      Ins : Increase master volume. (Sound Blaster)
  456.      Del : Decrease master volume. (Sound Blaster)
  457.  
  458.    (j) In sound player:
  459.      SPACE  : Pause/continue.
  460.      +      : Increase Wave volume.
  461.      -      : Decrease Wave volume.
  462.      Ins    : Increase master volume.
  463.      Del    : Decrease master volume.
  464.      ESCAPE : Stop.
  465.  
  466. +  (k) User input:
  467. +    To input hex number, use 'x????'.
  468.  
  469. +  (l) Get color in graphic mode:
  470. +    Please refer to (b) and use CTRL-F11 to get color.
  471.  
  472.  
  473. (6) Mouse Buttons
  474. =================
  475.  
  476.     MIDDLE button and CTRL-RIGHT button always mean ESCAPE.
  477.  
  478.    (a) in read/write menu:
  479.      single-click LEFT or RIGHT button = 'move select bar'.
  480.      double-click LEFT button  = RETURN.
  481.      double-click RIGHT button = SPACE.
  482.      CTRL-LEFT button = Tag.
  483.  
  484.    (b) in other text menus:
  485.      RIGHT button means SPACE.
  486.      single-click LEFT button = 'move select bar'.
  487.      double-click LEFT button = RETURN.
  488.  
  489.    (c) in contact sheet preview:
  490.      RIGHT = show/hide mouse cursor.
  491.      LEFT  = move an image piece if the mouse cursor is shown,
  492.              else leave graphics mode.
  493.      CTRL-LEFT = move contact sheet.
  494.  
  495.    (d) in image display screen:
  496.      RIGHT = show/hide mouse cursor.
  497.      LEFT  = move the image around the screen if the mouse cursor is shown,
  498.              else leave graphics mode.
  499.      CTRL-LEFT  = move one page.
  500.      SHIFT-LEFT = Pop out graphic menu.
  501.        You can move this box around screen by click and drag.
  502.      ALT-LEFT = define rectangle for cropping.
  503.        Releasing left button will crop image if ALT key is still pressed,
  504.        else do nothing.
  505.      CTRL-ALT-LEFT = toggle showing image coordinates.
  506. +      LEFT : Done.     
  507.        While showing image coordinates, press ALT-LEFT to define cropping
  508.        rectangle.
  509.  
  510.    (e) in mode selection screen:
  511.      Click LEFT button at:
  512.        'Imag8' or 'Imag24' : change processing target.
  513.        '000 x 000 x 000' or '000 x 000' : change display type.
  514.        '<--' or '|||' : change linking status. (controlled by resource
  515.                         'auto_link_24_to_8').
  516.  
  517.    (f) in text/ansi-screen viewer:
  518.      RIGHT button : Same as SPACE.
  519.      Click LEFT button at:
  520.        Top of screen       : Scroll down one page.
  521.        Bottom of screen    : Scroll up one page.
  522.        Left end of screen  : Scroll right.
  523.        right end of screen : Scroll left.
  524.        Upper half of screen: Scroll down.
  525.        Lower half of screen: Scroll up.
  526.  
  527.    (g) in image INDEX viewer:
  528.      LEFT button  : Same as (d)
  529.      RIGHT button : View this image.
  530.  
  531. +  (h) in slide show:
  532. +    Works only in non-scroll mode.
  533. +    LEFT button  : equivalent to RETURN.
  534. +    RIGHT button : equivalent to BACKSPACE.
  535.  
  536. +  (i) Get color in graphic mode:
  537. +    Please refer to (d) and use CTRL-ALT-LEFT to get color.
  538.  
  539.    In some text regions the mouse cursor will change. Press the LEFT button
  540.    to accomplish that.
  541.  
  542.  
  543. (7) Screen saver
  544. ================
  545.    Use resource 'screen_save_time' in config.dis to control the idle time
  546.    to active screen saver. You can also move mouse cursor to the following
  547.    places to control screen saver:
  548.    
  549.      Upper-Left corner : Never sleep.
  550.      Low-Right corner  : Sleep now.
  551.  
  552.  
  553. (8) Preview
  554. ===========
  555.    Preview lets you see the small image of this picture before loading it.
  556.    You can use key 'p' to turn on/off preview (DISPLAY will switch to
  557.    graphic text mode if necessary). Currently DISPLAY support 2 strategies
  558.    for preview, i.e. loading preview from .TNL file and original image.
  559.    The first method is faster, but you need to make .TNL file first. You can
  560.    also use PKZIP or ZIP to archive .TNL images together to reduce the disk
  561.    space occupation. This .ZIP file is called 'packfile'.
  562.    The procedures of loading preview are described below:
  563.    (use_tnl_preview, global_tnl_path, global_tnl_packfile & local_tnl_packfile
  564.     are resources in config.dis)
  565.  
  566.    1. 
  567.       If 'use_tnl_preview' is false(i.e. 0), goto step 3.
  568.       Load preview from .TNL file within current directory. Filename is the
  569.       same as current image filename, except that extension is changed to .TNL.                                                            
  570.       If success, return.
  571.       If 'local_tnl_packfile' is specified, try to load the corresponding .TNL
  572.       image from this file within current directory.
  573.       If success, return.      
  574.    2.
  575.       If 'global_tnl_path' is not specified, goto step 3.
  576.       Load preview from .TNL file within 'global_tnl_path'. Filename is the
  577.       same as current image filename, except that extension is changed to .TNL.
  578.       If success, return.     
  579.       If 'global_tnl_packfile' is specified, try to load the corresponding .TNL
  580.       image from this file within 'global_tnl_path'. 
  581.       If success, return.
  582.    3.
  583.       Don't use .TNL file. Load preview from current image.
  584.       Return.
  585.  
  586.  
  587. (9) Initialization steps
  588. ========================
  589.  
  590.   The followings are what happen when you start DISPLAY. There's nothing
  591.   you have to do, but it helps to avoid errors. The important thing is,
  592.   that a command-line option overrides the configuration file option.
  593.  
  594.     1. Find allowed screen resolutions (for .grn video drivers only).
  595.     2. Read the configuration files (Global first, then Local).
  596.        Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
  597.        If you use '-f' command-line option, Global and Local config files
  598.        are ignored. The specified file is used.
  599.     3. Process the command-line options (if any). So command-line options
  600.        override the configuration file.
  601.     4. Now, RUN.
  602.  
  603.  
  604.  
  605. (10) Menu
  606. =========
  607.  
  608.                                GENERAL RULES
  609.  
  610. This section will describe the menus and options you can choose from. You can
  611. read through it or just start the program and play around. When you have
  612. a problem you can come back and read the section you need.
  613.  
  614. Most things are self-explanatory. Look for the comments behind a possible
  615. command. Also keep an eye at the first and last row of the screen: DISPLAY
  616. will tell you in most cases what is going on.
  617.  
  618. There are several fields with a special meaning (i.e. [ Auto Read ]). You
  619. can activate them by moving the cursor inside the marks and then click the
  620. left mouse button.
  621.  
  622. In any MENU you can call a pull-down-menu by pressing the F9 key or moving
  623. the cursor to the top-line and click a button.
  624.  
  625. The different functions can also be selected by using a hot-key.
  626.  
  627. Sometimes DISPLAY will ask you questions. You can answer them with a mouse
  628. click or by pressing the first (capital) letter of the answers
  629. (i.e. Y or y for yes).
  630.  
  631. Allowed operations are shown in white the others in grey (if you use the
  632. default colors).
  633.  
  634.  
  635. -----------------------------------------------------------------------------
  636.                               THE READ-MENU
  637. -----------------------------------------------------------------------------
  638.  
  639.  
  640. After starting DISPLAY, you will find yourself in the read-menu. You will see
  641. a file list of the directory you started DISPLAY from (or the directory you
  642. have specified with the -t command line option). Which file information you
  643. see, depends on your selection in the config.dis file. You can choose from
  644. different informations (including 4DOS description files).
  645. There are some marked fields you can use with the mouse. In the pull down
  646. menu-bar you will find 8 headers with a different number of options. Because
  647. most operations are accessible with short-cuts, that's the easiest way to call
  648. them. For some operations (i.e. slide show) you have to tag at least one file.
  649.  
  650. For Reading a file (image, movie) simply select one and press RETURN or double
  651. click with the left mouse button. Display will autodetect the correct format
  652. by itself. If you have problems try using the SPACE bar or double click with
  653. the right mouse button for selecting a format manually.
  654.  
  655. When image dimension is shown, '*' means that this image is 24-bit. percentage
  656. means the compression ratio (file size/image size). Where image size is
  657. image_width * image_height * pixel_size(1 or 3).
  658.  
  659. There is a status line at the bottom of screen. 'gamma' means gamma
  660. correction is used. 'desc' means file descriptions are changed. 'Hi' means
  661. using HiColor mode for preview.
  662.  
  663.  
  664. 1. HELP
  665.  
  666.    Here you find some informations about display and it author. You can choose
  667.    the complete help (this file) and a short overview of key assignments.
  668.    Calling help will load the DISPLAY.DOC file. It contains help about possible
  669.    actions and a list of all short-cuts. There is also a description of the
  670.    meaning of the mouse buttons (be sure to check them out, because they
  671.    change, depending on the menu you use).
  672.    The second file is user defined, so you can write whatever you want. The
  673.    actual file brief.doc is just an example.
  674.  
  675. 2. FILE
  676.  
  677.    You have several options to manipulate files. You can delete, move, copy,
  678.    rename and view files. The options for shelling to DOS and quiting the
  679.    program are also located under this header. You can perform the actions on
  680.    a single file, a group of files (that is, tagged files), or the file
  681.    currently under the marker.
  682.  
  683. 3. DIR
  684.  
  685.    From inside DISPLAY you can make directories. Another point is rereading
  686.    the current directory, for updating changes you have written to disk.
  687.  
  688. 4. OPERATION
  689.  
  690.    That's the menu with the real highlights of DISPLAY. Here you can choose
  691.    from the options: slide show, batch conversion, contact sheet, accumulate
  692.    quantization, and the special effects. Further you can display the fonts
  693.    comming with DISPLAY, show and write a already loaded image, and unpack
  694.    gl-files. You can also create a .flc movie. For some operations, you must
  695.    tag files first.
  696.  
  697. 5. CHANGE
  698.  
  699.    Under this header you will find options to select the image type and
  700.    graphic resolution (for a list of possible modes for your graphic card
  701.    take a look at the status menu or type L). Other options are for changing
  702.    the working-drive and for editing the file mask (see match.doc).
  703.  
  704. 6. TAG
  705.  
  706.    Believe it or not this one is for tag and untag files (single, group, all).
  707.    I think that's all you must know.
  708.  
  709. 7. OPTION
  710.  
  711.    This menu point is for changing the defaults. Open the submenu and you
  712.    will see a number of fields, where you can change most parameters that
  713.    DISPLAY uses. You can activate them just for one run or make them the
  714.    default by saving a new config.dis. You can work with different configur
  715.    -ations, when you use different local config.dis files (i.e. make
  716.    directories for the users of your system, if there is more then one).
  717.    If you don't understand the meanings of parameters, please read config.dis.
  718.  
  719. 8. STATUS
  720.  
  721.    Here you can get informations about your graphic card, RAM, disk space,
  722.    and the formats of your image files.
  723.  
  724.  
  725.  
  726. -----------------------------------------------------------------------------
  727.                                 THE WRITE-MENU
  728. -----------------------------------------------------------------------------
  729.  
  730.  
  731. When you choose an option that will write changes to your disk, you will
  732. sometimes enter the write-menu (i.e. moving files). In the write menu you
  733. will find other marked fields for use with mouse. Although you will see the
  734. same headers in the pop-up-menu, most of the options are disabled. Also the
  735. most short-cuts won't help you. I think you will use this menu without
  736. problems, because it is very self-explanatory.
  737.  
  738.  
  739.  
  740. -----------------------------------------------------------------------------
  741.                                THE SCREEN-MENU
  742. -----------------------------------------------------------------------------
  743.  
  744.  
  745. Once you have loaded a picture, you will see the screen-menu (if you don't
  746. set the 'auto_display_image' to 1). It has a different look and pop-up-menu
  747. structure. If the loaded file is a movie, you will find yourself in another
  748. menu, which is optimized for the additional needed options you need to
  749. display movies.
  750.  
  751. The marked fields in the screen-menu are for viewing an image in the selected
  752. resolution or writing it to file. Further you can go back to the read-menu or
  753. exit the program. On the left you see three bigger fields. They are for those
  754. of you, who are using a mouse and don't want to use the keyboard for pressing
  755. the return, space, or esc keys.
  756.  
  757. The graphic modes you can choose from (to show the image) are in white, the
  758. others are grey.
  759.  
  760. Pressing F9 again will bring up the headers of the pop-up-menu. These have
  761. changed a little, compared to the read/write menu
  762.  
  763. 1. HELP
  764.  
  765.    Same as in read/write menu.
  766.  
  767. 2. FILE
  768.  
  769.    Only the exit option is still there, for the other things you have to go
  770.    back to the read/write menu.
  771.  
  772. 3. OPERATION
  773.  
  774.    Three options are now in the submenu. You can choose between special
  775.    effects, display fonts, and change processing target. The last option
  776.    means to change between palette images (most 8-bit images are of that
  777.    type) and RGB-pictures (truecolor, highcolor).
  778.  
  779. 4. OPTION
  780.  
  781.    Same as in read/write menu except for the preview option.
  782.  
  783. 5. STATUS
  784.  
  785.    The possible graphic and text mode are shown here (depends on your
  786.    hardware and the driver you use).
  787.  
  788. 6. UTIL
  789.  
  790.    What you find in this submenu are some often used operations from the
  791.    special effects menu (look there for a description of the comands).
  792.    Another way to manipulate your image is the pop-up menu in graphics
  793.    mode. There you can perform some effects without leaving the picture.
  794.  
  795.  
  796.  
  797. (11) Special Effects
  798. ====================
  799.  
  800. -----------------------------------------------------------------------------
  801.                              SPECIAL-EFFECTS-MENU
  802. -----------------------------------------------------------------------------
  803.  
  804. When you start manipulating your pictures you will at some point look in the
  805. special-effects-menu. The different effects are sorted in 6 groups. As
  806. mentioned above you can rotate, flip, resize, mix, and convert images.
  807. Most often other programs offer only some of the operations DISPLAY is able
  808. to perform. Some other effects DISPLAY performs are otherwise found in
  809. professional and expensive graphic packages only!
  810.  
  811. In this chapter you will find the complete list of possible effects with some
  812. short comments. The numbers are the same as in DISPLAY. If you want to make
  813. some of these effects the defaults for batch conversion please find the
  814. [Batch_Convert] section in config.dis and read the comment.
  815.  
  816. At the end of this section are some more detailed explanations of selected
  817. special effects (marked with an '*'), don't miss them !!
  818.  
  819.  
  820. Number          Operation                       Comment (if necessary)
  821.  
  822.  
  823. (01)-(01)       Flip Horizontal                 -
  824.  
  825. (01)-(02)       Flip Vertical                   -
  826.  
  827. (01)-(03)       Rotate Clockwise (90)           -
  828.  
  829. (01)-(04)       Rotate Counter-clockwise (90)   -
  830.  
  831. (01)-(05) *     Rotate/Shear image(any angle)   lets you rotate the image any
  832.                 (->24)                          angle you want. If you don't
  833.                                                 know what shearing means just
  834.                                                 do it. It's easier to look
  835.                                                 than to explain.
  836.  
  837.  
  838. (02)-(01) *     Resize image ( ->24 )           the resizing operation will
  839.                                                 promote the image to 24-bit
  840.                                                 if you smooth it. In the
  841.                                                 upcoming screen are some more
  842.                                                 options: You can change the
  843.                                                 size by pixel, by %, or
  844.                                                 resize different images to
  845.                                                 the same size (batch conver-
  846.                                                 sion)
  847.  
  848. (02)-(02)       Auto Crop                       cuts off "unused" pixel. Better
  849.                                                 use the online crobbing in
  850.                                                 graphic mode (Crtl-cursor).
  851.                                                 Useful for batch conversion
  852.  
  853. (02)-(03) *     Mix/Concat two images(->24)     overlay or put together two
  854.                                                 images with different options
  855.  
  856. (02)-(04) *     New Dimension                   Adjust the image dimension.
  857.                                                 Adding background or cropping
  858.                                                 if necessary.
  859.  
  860. (02)-(05)       Crop image only (any position)  cuts off parts of the image
  861.                                                 you can specify the position
  862.                                                 and the offset
  863.  
  864. (02)-(06) *     Make image translation (->24)   Described later.
  865.  
  866. (03)-(01)       Convert to Grayscale            -
  867.  
  868. (03)-(02)       Do B/W Dither                   try FS (Floyd-Steinberg) first
  869.  
  870. (03)-(03)       Pseudo Color                    do you like strange effects ?
  871.                                                 Convert grey scale image to
  872.                                                 color.
  873.  
  874. (03)-(04) *     Color Quantization(24->8)       statistical should be first
  875.                                                 choice. It's good and fast.
  876.  
  877. (03)-(05)       Promote to 24-bits(8->24)       Will be done if needed, so you
  878.                                                 need this not often
  879.  
  880. (03)-(06)       Flatten grey image              Let the pixel value be equal
  881.                                                 to the brightness (grey value).                                                
  882.  
  883.  
  884. (04)-(01)       Histogram Equalization          enhance the contrast.
  885.  
  886. (04)-(02)       Smooth/Enhance Images(->24)     -
  887.  
  888. (04)-(03)       Edge Enhancement(->24)          find the image 'edge'.
  889.  
  890. (04)-(04)       Negate Image                    -
  891.  
  892. (04)-(05)       Oil paint(->24)                 ever wanted to be a painter ?
  893.  
  894. (04)-(06)       Gamma Correction                better use F1-F8 in graphic
  895.                                                 mode. Useful for batch convert
  896.  
  897. (04)-(07)       Cheesy Embossing(->24)          convert color to height-field
  898.  
  899. (04)-(08) *     Remove unused colors(8)         -
  900.  
  901. (04)-(09)       Swap R/G/B                      make some funny images !
  902.                                                 interesting for pseudo-colored
  903.                                                 images.
  904.  
  905. (04)-(10) *     General convolution             Do 3x3 matrix multiplication
  906.                                                 Try to understand the given
  907.                                                 expression (it's simpler than
  908.                                                 it looks).
  909.  
  910. (05)-(01)       Discard 24-bit image(24)        -
  911.  
  912. (05)-(02)       Discard 8-bit image(24)         -
  913.  
  914. (05)-(03)       Push image into stack           -
  915.  
  916. (05)-(04)       Pop image from stack            -
  917.                                        
  918. (05)-(05)       Clear stack                     -
  919.  
  920.  
  921. (06)-(01)       Load Palette Table              -
  922.  
  923. (06)-(02)       Save Palette Table              -
  924.  
  925. (06)-(03)       Display Palette Table           -
  926.  
  927. (06)-(04)       Push Palette Table              -
  928.  
  929. (06)-(05)       Pop Palette Table               -
  930.  
  931.  
  932. Detail Explanations of Special Effects
  933. --------------------------------------
  934.  
  935. DISPLAY can store both 8-bit and 24-bit images in memory. If 8-bit image
  936. presents, 'Imag8' is shown in the screen mode/resolution selection scren.
  937. Otherwise 'NULL8' is shown. For 24-bit image, 'Imag24' or 'NULL24' is shown.
  938. If 'Imag8' or 'NULL8' is highlighted, all special effects are performed on
  939. 8-bit image, which is called processing target. Of course, error message is
  940. shown, if there is no 8-bit image ('NULL8' is shown). In general DISPLAY can
  941. make the best decision for you. You can also use TAB key to change the
  942. processing target. The general rule is:
  943.  
  944.   The processing target is always the newly saved image.
  945.  
  946. If possible, DISPLAY keeps the target type. That is, after processing 8-bit
  947. image is still 8-bit. If it is not allowed, type tranformation occurs. For
  948. exmaple, 'Flip image' keeps the target type, while 'Quantization' converts
  949. 24-bit image to 8-bit image. The follow is the used symbols:
  950.     -> 24  : Result is always 24-bit image(with some exceptions).
  951.     -> 8   : Result is always 8-bit image.
  952.   8 -> 24  : This effect works on 8-bit image only and produces 24-bit image.
  953.   8        : This effect works on 8-bit image only. Image type is preserved.
  954.  
  955. Some effects(or called operations) are easy to understand. Just do it and
  956. see the result. Some are difficult to understand. Here I make the detail
  957. explanations of some effects.
  958.  
  959.  
  960. (01)-(05)                       Rotate/Shear image (any angle)(->24)
  961.   Antialias :                   The result looks more smooth.
  962.   Background R,G,B :            Used to fill the unused area in the result.
  963.  
  964. (02)-(01)                       Resize image (->24)
  965.   Image width, Image height :   You can use '%' to specify the percentage
  966.                                 relative to the original image dimension.
  967.   Preserve aspect ratio :       DISPLAY keeps the original width v.s. length
  968.                                 ratio in the result.
  969.   Smoothing :                   The result looks more smooth. If this
  970.                                 opation is off, image type is preserved.
  971.                                 Otherwise 24-bit image is produced.
  972.   Resize method (for batch) :   This option works for batch conversion only.
  973.     Absolute :                  Image is resized to the specified size.
  974.     Relative :                  Image is resized to the specified percentage
  975.                                 relative to the original image.
  976.     Bounded box :               Image is resized to the specified bound box
  977.                                 size. The result is always smaller than or
  978.                                 equal to the bound box. Use 'Preserve aspect
  979.                                 ratio' to control the aspect ratio.
  980.     Fix width :                 If 'preserve aspect ratio', use the specified
  981.                                 image width and adjust image height so that
  982.                                 the new aspect ratio is the same as original,
  983.                                 otherwise same as 'Absolute'.
  984.     Fix height :                Same as above but applied to height.                               
  985.  
  986. (02)-(03)                       Mix/Concat two images (->24)
  987.                                 This is the one of thw two effects that
  988.                                 works on two images.
  989.   Fore over Background(no w.) : Very simple. If the pixel in forground image
  990.                                 is BLACK(that is, pixel value is 0), it is
  991.                                 replaced by the corresponding pixel in
  992.                                 background image.
  993.   Background R,G,B :            Used to fill the unused area in the result.
  994.  
  995. (02)-(04)                       New Dimension
  996.                                 This effect doesn't resize image, just change
  997.                                 the image size. If the new size is smaller
  998.                                 than original size, cropping is performed.
  999.                                 Otherwise, unused area is filled with Back-
  1000.                                 ground R,G,B.
  1001.                                 For 24-bit image, the result is always 24-bit.
  1002.                                 For 8-bit image, if number of colors is greater
  1003.                                 than 256, the result is converted to 24-bit.
  1004.  
  1005. (03)-(04)                       Color Quantization (24->8)
  1006.                                 This is the most complicated
  1007.                                 operation in DISPLAY.
  1008.                                 I recommend the 'Statistical' and
  1009.                                 'Variance Based' methods.
  1010.   Fixed 256 :                   Worse quality, fast, always 256 colors.
  1011.   Median Cut :                  quality better than 'Fixed 256', slightly slow.
  1012.   Median Cut(Better) :          The best quality of all, need LARGE memory,
  1013.                                 slowest. I don't recommend you the method.
  1014.   Grey 256 :                    Convert to grey, always 256 colors, fastest.
  1015.   Variance Based :              Good quality, accetable time and memory
  1016.                                 comsumption.
  1017.   Statistical :                 Actually, I can hardly tell the difference
  1018.                                 between this method and 'Variance Based'.
  1019.   Current Palette :             Useful if you want to produce images that use
  1020.                                 the same palette. Use 'display palette table'
  1021.                                 to show current palette.
  1022.   Ordered(fast) :               The fastest method for color quantization.
  1023.                                 Need no additional memory.
  1024.   Neural Net(256) :             Always 256 colors. The quality is controlled by
  1025.                                 'neuquant_sample_factor' resource.
  1026.  
  1027.  
  1028.  
  1029. (04)-(08)                       Remove unused colors (8)
  1030.                                 This effect trys to remove unused and
  1031.                                 duplicated colors from 8-bit image.
  1032.                                 It can decrease the number of colors.
  1033.  
  1034. (04)-(10)                       General convolution (-> 24)
  1035.                                 I think that mathematical expression is
  1036.                                 more clear:
  1037.        _                             _            _           _
  1038.       | (x-1,y-1) (x  ,y-1) (x+1,y-1) |          |  K0  K1  K2 |
  1039.   A = | (x-1,y  ) (x  ,y  ) (x+1,y  ) | ,    B = |  K3  K4  K5 |
  1040.       | (x-1,y+1) (x  ,y+1) (x+1,y+1) |          |  K6  K7  K8 |
  1041.        -                             -            -           -
  1042.   new pixel at (x,y) = (sum all A(i,j) * B(i,j)) / overall_divider
  1043.  
  1044.                                 For those without matrix knowledge:
  1045.                                 Think of A as a picture.
  1046.               1 1 1             The B matrix are the 9 values you can fill
  1047.               1 1 1             in the Kernel fields. The multiplication of
  1048.               1 1 1             two matrices (which must have the correct
  1049.                                 row and column size) results in a single value.
  1050.   R R R                         Now imagine that 'picture' A (3x3 pixel)
  1051.   G G G    3xR+3xG+3xB          consists of colored lines (i.e. Red Green Blue)
  1052.   B B B                         and all K-values in B equals '1'.
  1053.                                 You'll get a new center pixel, which is bright
  1054.   3 red + 3 green + 3 blue      white. If you set the overall divider to 50
  1055.                                 the resulting pixel will be grey (dark white).
  1056.                                 So as a result you will mix-up the colors of
  1057.                                 your picture. The divider sets the brightness.
  1058.  
  1059. (02)-(06)  Make image translation (->24) (documented by Bernhard Maerz)
  1060. ----------------------------------------
  1061. This is a very powerfull tool to make nice effects by changing of the
  1062. brightness. There are much different ways possible to change the brightness 
  1063. and secondary there could be used a maskfile to use different methods on
  1064. different parts of the picture.
  1065.  
  1066. Foreword:
  1067.    three numbers separated by a '/' are RGB values:
  1068.    i.g. 30/60/0 are   Red=30, Green=60 and Blue=0 
  1069.  
  1070.  
  1071. First, there should be explained how the brightness would be changed.
  1072. For this thing, there exist a 256x256 image (called TABLE), which tells how 
  1073. to do it. You can select Your own table or You can use one of the tables
  1074. directly implemented in DISPLAY (read display.faq for the formulas) :
  1075. - User defined table (from stack)
  1076. - Brightness adjust
  1077. - Contrast adjust
  1078.  
  1079. Before You read the following, You could take a small look on one of the
  1080. implemented tables with the option (in the mask image translation menu):
  1081.    Display mask table in graphic mode
  1082.  
  1083. You will see a 256x256 image. Each defined method of changing the brightness
  1084. needs ONE HORIZONTAL LINE. Because there are 256 lines, there are 256 WAYS
  1085. of changing the brightness.
  1086.  
  1087. Let us look at an example to explain how it work: the implemented brightness
  1088. table. The upper and the left numbers are only for help and are not saved in
  1089. the tablefile. The numbers in the table are set by colors:
  1090. (The value along Y axis is taken from mask, while the value along X axis
  1091.  taken from original image)
  1092.  
  1093.    black for 0 - white for 255
  1094.  
  1095.      #   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
  1096.  #########################################################################
  1097.    0 #   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
  1098.    . #
  1099.   64 #   0   0   1   1   2   2   3   3   4   4   5   5   6   6   7   7   8
  1100.    . #
  1101.  128 #   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16
  1102.    . #
  1103.  192 # 128 128 129 129 130 130 131 131 132 132 133 133 134 134 135 135 136
  1104.    . #
  1105.  255 # 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
  1106.  
  1107.  
  1108. This table contains 256 ways of changing the brightness. Let us look at
  1109. one of them. For example, take a look at line 64. This line contains
  1110. 256 numer of values. 
  1111. For EACH OLD BRIGHTNESS VALUE are standing the NEW VALUE OF BRIGHTNESS.
  1112.  
  1113. When the brightness is changed, this will be done separately with
  1114. Red, Green and Blue.
  1115.  
  1116. The line 64 'says' the following:
  1117.    For EACH Red, Green, Blue value it will be changed 
  1118.       from 0 to 0
  1119.       from 1 to 0
  1120.       from 2 to 1
  1121.       from 3 to 1
  1122.       from 4 to 2
  1123.    ans so on.
  1124.   
  1125. So here are a few examples:  
  1126.   The color   6/0/1    will be changed to   3/0/0
  1127.   the color   6/9/0    will be changed to   3/4/0
  1128.   the color   4/7/5    will be changed to   2/3/2
  1129.  
  1130. For each pixel, You can specify 3 different mask values for R, G, and B,
  1131. respective. For example, you can use masks 0, 128, and 255. Therefore
  1132. red component is changed to 0, green component is not changed, and blue
  1133. component is changed to 255.
  1134.  
  1135. If You have carefully lookd at the table, You would have remarked that the
  1136. line 128 doesn't change anything. And if You have take a better look, You
  1137. would know what the 256 methods would be done:
  1138.    
  1139.    Brightness adjust table
  1140.    Methode
  1141.    0          Darken the image to fully black
  1142.    ...        Darken the image
  1143.    128        Doesn't change the image
  1144.    ...        Lighten the image
  1145.    256        Lighten the image to fully white
  1146.  
  1147.  
  1148. And this is the first easy way to use this option. You can simple select
  1149. the option 
  1150.    'Where to get Mask                 User input'
  1151. and then You can say with
  1152.   'Mask value (user input)'
  1153. which of the 256 methods should be used. You can specify three different
  1154. mask values for R, G, and B, respective. Then the whole picture would be 
  1155. changed with these methods specified by the three masks.
  1156.  
  1157. If You select the Brightness adjust table and the mask value of 100, the
  1158. image would be a bit darken. Have You selected 70 instead, the picture would
  1159. be a bit more darken.
  1160.  
  1161. Maybe You ask, You could have done that allready with DISPLAY (but not with
  1162. different strengthness). But with this table You are much more flexible.
  1163. So You could make a table which will lighten only the dark parts of the
  1164. picture. Such a table could look like the following:
  1165.    
  1166.         0 ... 30 ... 60 ... 90 ... 120 ... 150 ... 180 ... 210 ... 240 ...
  1167.  #########################################################################
  1168.    . #
  1169.  128 #  0 ... 30 ... 60 ... 90 ... 120 ... 150 ... 180 ... 210 ... 240 ...
  1170.    . #
  1171.  160 #  0 ... 70 ... 95 ...120 ... 145 ... 170 ... 195 ... 220 ... 245 ...
  1172.    . #
  1173.  192 #  0 ...110 ...130 ...150 ... 170 ... 190 ... 210 ... 230 ... 250 ...
  1174.    . #
  1175.  
  1176. The method in line 192 says the following:
  1177.   30/0/0    will be lighten by    +80    to    110/0/0
  1178.   60/0/0    will be lighten by    +70    to    110/0/0
  1179.   90/0/0    will be lighten by    +60    to    150/0/0
  1180.   ...
  1181.  
  1182. But furthermore, the option 'Mask image translation' could be made even
  1183. more.
  1184.  
  1185. It's not only possible to say what method should be used by the option 
  1186. user input, it's possible to use different methods in one process by
  1187. defining a mask file.
  1188.  
  1189. This mask file should have the same size as the image to process, but
  1190. there is no need to make this manually, because DISPLAY resizes it 
  1191. automatically. But if the size of the mask file is very small (relatively
  1192. to the picture), the size should be increased a bit manually (with smooth),
  1193. because DISPLAY resizes it directly while processing the 'mask image
  1194. translation' and can't so use any smoothing.
  1195.  
  1196. Then DISPLAY takes each pixel from the original picture (which should be
  1197. changed) and takes the pixel from the mask picture from the same position
  1198. (tells the methode) and makes the changes like defined.
  1199.  
  1200. For this I will make a small example which uses again the brightness adjust 
  1201. table.
  1202.  
  1203. The mask file could look like the following.
  1204.  
  1205.                0  10   30  10   0
  1206.               10  40   60  40  10
  1207.               30  60  128  60  30
  1208.               10  40   60  40  10
  1209.                0  10   30  10   0
  1210.  
  1211. With such a mask file (and brightness adjust table) the orignal picture 
  1212. will be stay in the center, but it will be become more darker to the edge.
  1213.  
  1214. In the text above, I have allways written ONE number in the table and mask 
  1215. file. This means all changes done for Red, Green and Blue are the same. But
  1216. You can use RGB images as masks, too, and then the changes are different.
  1217.  
  1218. You can use RGB or 8-bit image as table (palette is discarded). Finally,
  1219. the mathematical equation is given below (for 24bit mask and table):
  1220.  
  1221.   new_pixel[x,y].r = table[ old_pixel[x,y].r , mask[x,y].r ].r
  1222.   new_pixel[x,y].g = table[ old_pixel[x,y].g , mask[x,y].g ].g
  1223.   new_pixel[x,y].b = table[ old_pixel[x,y].b , mask[x,y].b ].b
  1224.  
  1225.  
  1226. (12) Tech. information
  1227. ======================
  1228.  
  1229.   Program (user interface and some codecs) written by Jih-Shin Ho.
  1230.   Some codecs are borrowed from XV (2.21) and PBMPLUS (Dec. 1991).
  1231.   JPEG is based on the JPEG library(5b) by the Independent JPEG Group.
  1232.   Tiff is based on the Tiff library(3.2) from ftp.sgi.com.
  1233.   DL is based on xdl.c & Xanim269.
  1234.   FLI/FLC is based on the article in DDJ (Mar. 1993).
  1235.   MPEG is based on Berkeley mpeg_play 2.0.
  1236.   AVI(CRAM,CVID,ULTI) is based on Xanim269 by Mark Podlipec.
  1237.   MPEG split is based on mpgsplit by Stefan Eckart.
  1238.   Inflate code, written by Mark Adler, is borrowed from Info-ZIP's UNZIP 5.12.
  1239.   Deflate code, written by ,is borrowed from Info-ZIP's ZIP 2.01.
  1240.   Compiled with DJGPP.
  1241.   All video drivers are borrowed from DJGPP and GRX, or from users.
  1242.   You can get the whole DJGPP and GRX package from :
  1243.     omnigate.clarkson.edu: /pub/msdos/djgpp
  1244.     or Simtel mirror sites. For example:
  1245.     oak.oakland.edu: /SimTel/vendors/djgpp.
  1246.  
  1247.  
  1248. (13) About the author
  1249. =====================
  1250.  
  1251.   I am a student in National Chiao-Tung University, Taiwan, R.O.C.. Why do I 
  1252. write DISPLAY ? Because I can't find any viewer in DOS world which can fulfill 
  1253. my needs. I want to have a viewer for my personal use, so that I can do any 
  1254. experiment I want to do. It is obvious that the easiest and best way is to
  1255. write a viewer by myself.
  1256.  
  1257.   The first thing I think of is which compiler I should use. Turbo-C ? No, I
  1258. don't want to bother with segment and offset any more. Watcom-C ? No, I don't
  1259. have money to buy it. DJGPP ? YES, it is a 32-bit C compiler with good
  1260. reliability becuase the engine is GNU C compiler. The most important reason is 
  1261. that it is FREE.
  1262.  
  1263.   I develop DISPLAY on 486DX-33 with 16MB ram, So memory is not a problem. I
  1264. decide to write program in UNIX style, because DJGPP emulates the UNIX
  1265. environment. Thanks to the virtual memory function in DJGPP, I don't need to
  1266. worry about the memory allocation. In the initial stage, I just write DISPLAY 
  1267. for my persion use. Finally, I want to hear others' opinions, so I release it 
  1268. to the Net. Many people give me suggesitons, encouragement and bug reports. 
  1269. They all help to keep DISPLAY growing. The role of DISPLAY also changes from 
  1270. plain viewer to multi-purpose viewer. Now DISPLAY is not just my program
  1271. because it includes many ideas from the users.
  1272.  
  1273.   DISPLAY source code size : 156 files, 77927 lines, 2560246 bytes.
  1274.   Including : ZIP code.
  1275.   Not including : MPEG player, JPEG and TIFF library.
  1276.  
  1277.   Finally, if you think that DISPLAY is good enough and would like to write a
  1278.   postcard to me, my physical address is :
  1279.  
  1280.   Room 1410, Graduate Student Dorm., National Chiao-Tung University,
  1281.   Hsin-Chu 300, Taiwan, R.O.C.
  1282.   
  1283.   My room (above address) will change after September 1995. If you want to
  1284.   mail me without knowing my new address, you can mail to:
  1285.   
  1286.   Institute of Electronics, Engineering Building 4, National Chiao-Tung
  1287.   University, Hsin-Chu 300, Taiwan, R.O.C.
  1288.  
  1289.  
  1290. (14) Final
  1291. ==========
  1292.  
  1293.    This document is not well-written. If you have any PROBLEMS, SUGGESTIONS,
  1294.    COMMENTS on this program, please send a mail to
  1295.  
  1296.            u7711501@bicmos.ee.nctu.edu.tw (140.113.11.13).
  1297.               (There is NO anonymous ftp on this site.)
  1298.  
  1299.    I need your suggestions to improve this program.
  1300.  
  1301.  
  1302. Acknowledgments:
  1303.   I should like to thank the authors of XV and PBMPLUS for their permission
  1304.     to let me use their subroutines.
  1305.   Also, I thank the authors of the TIFF and JPEG libraries.
  1306.   Thank you DJ. Without DJGPP I can't do anything on a PC.
  1307.   The author would like to thank Olivier Dumas, Oliver Weyand, Ben Jos Walbeehm,
  1308.     Bryan Woodworth and other users for their advices and suggestions.
  1309.   Thanks Bernhard Maerz, Paul Melman for giving me suggestiions continuously.
  1310.   The author would like to thank NCTUCCCA for offering a place for DISPLAY.
  1311.  
  1312.  
  1313.                                             Jih-Shin Ho
  1314.                                    u7711501@bicmos.ee.nctu.edu.tw
  1315.